package com.newland.test;

import it.geosolutions.geoserver.rest.GeoServerRESTManager;
import it.geosolutions.geoserver.rest.GeoServerRESTPublisher;
import it.geosolutions.geoserver.rest.decoder.RESTDataStore;

import java.net.URL;
import java.util.Map;

public class ShpTestReader {

    public static void main(String[] args) throws Exception{
        //GeoServer连接配置
        String url = "http://10.43.86.32:9239/geoserver";
        String userName = "admin";
        String passWord = "geoserver";

        String workSpace = "test";     //创建的工作区名称
        String storeName = "shpTest"; //创建的数据存储名称

        //与GeoServer连接，进行管理
        GeoServerRESTManager manager = new GeoServerRESTManager(new URL(url), userName, passWord);
        //GeoServerRESTPublisher publisher = manager.getPublisher();

        RESTDataStore restDataStore = manager.getReader().getDatastore(workSpace, storeName);
        Map<String, String> nn= restDataStore.getConnectionParameters();
        System.out.println("===========");
    }
}
